﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using YX.Properties;

namespace YX
{
     class EnemyBoom:FatherBoom
    {
        private Image [] image0 = { 
                                   Resources.enemy0_down1,
                                   Resources.enemy0_down2,
                                   Resources.enemy0_down3,
                                   Resources.enemy0_down4
                                   };
        private Image [] image1 =  {
                                   Resources.enemy1_down1,
                                   Resources.enemy1_down2,
                                   Resources.enemy1_down3,
                                   Resources.enemy1_down4
                                   };
        private Image [] image2 =  {
                                   Resources.enemy2_down1,
                                   Resources.enemy2_down2,
                                   Resources.enemy2_down3,
                                   Resources.enemy2_down4,
                                   Resources.enemy2_down5,
                                   Resources.enemy2_down6
                                   };
        public int Type
        {
            get;
            set;
        }

        public EnemyBoom(int x,int y,int type):base(x,y)
        {
            this.Type = type;
        }

        public override void Draw(Graphics g)
        {
            switch (this.Type)
            {
                case 0:
                    for (int i = 0; i <image0.Length; i++)
                    {
                        g.DrawImage(image0[i], this.X, this.Y);
                    }
                    break;
                case 1:
                    for (int i = 0; i <image1.Length; i++)
                    {
                        g.DrawImage(image1[i], this.X, this.Y);
                    }
                    break;
                case 2:
                    for (int i = 0; i <image2.Length; i++)
                    {
                        g.DrawImage(image2[i], this.X, this.Y);
                    }
                    break;
            }
            SingleClass.GetSingle.RemoveClass(this);

        }

    }
}
